# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=inadyn
pkgver=2.12.0
pkgrel=0
pkgdesc="Dynamic DNS client with TLS support"
url="https://troglobit.com/projects/inadyn"
arch="all"
license="GPL-2.0-or-later"
options="!check" # not test suite
install="$pkgname.pre-install $pkgname.pre-upgrade"
depends="ca-certificates"
makedepends="confuse-dev openssl-dev>3"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://github.com/troglobit/inadyn/releases/download/v$pkgver/inadyn-$pkgver.tar.gz
	inadyn.initd
	"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/inadyn \
		--localstatedir=/var \
		--runstatedir=/run/inadyn \
		--enable-openssl
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm644 examples/inadyn.conf \
		"$pkgdir/etc/$pkgname/$pkgname.conf"

	install -Dm755 "$srcdir/$pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname"
}

sha512sums="
940e49cd2c434f57a56494e1946939f0d773deeb489939c957c0e1eac135177ab3c446e967daa01a56fde5490568761c1492646bae1bb2f63688e0e9121ef8fe  inadyn-2.12.0.tar.gz
1f05c76788c80f4b1a844d9aa5869f8a3d7444a704dab1510186edde969ed1b529e7134867b830fa9319e29265dc7f5fdf39c54f4bb07d3b9138f1d03528b878  inadyn.initd
"
